package com.kasinf.sample.mq.redis.config;

import com.kasinf.framework.cache.mq.RedisMessageInterceptor;
import com.kasinf.framework.cache.mq.RedisStreamMessage;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @Author : Kaiser
 * @Date: 2025/5/29  09:39
 */
@Slf4j
@Component
public class TestRedisMessageInterceptor implements RedisMessageInterceptor {
    @Override
    public void sendMessageBefore(RedisStreamMessage message) {
        log.info(">>>>> 消息发送前");
    }

    @Override
    public void sendMessageAfter(RedisStreamMessage message) {
        log.info(">>>>> 消息发送后");
    }

    @Override
    public void consumeMessageBefore(RedisStreamMessage message) {
        log.info(">>>>> 消息消费前");
    }

    @Override
    public void consumeMessageAfter(RedisStreamMessage message) {
        log.info(">>>>> 消息消费后");
    }
}
